package cg.studio.algorithm.graph;

/**
 * Graph problem: 
  Critical node: If a node reaches another node only through one node. 
  Eg: A-C-B and A-E-B are critical nodes. (A reach B through one node which is C or E) 
  If A reaches B through more than one node, then they are not critical nodes. 
  1) A-C-B 
  A-D-E-B (A reach B thro C which might lead to critical node but A has another path to B thro D and E, so they are not critical nodes). 
  2) X-Y-Z 
  X-A-Z (X and Z are critical nodes) 
  Now find all critical nodes.
 *
 * solution:
 *   - if the graph has loop, then, only the nodes inside the loop can be the pair of critical nodes,
 *     any node outside of the loop can be the critical node of node inside loop
 *     for loop, only the loop size is 4 can be critical nodes
 *     so, we separate graph into loops and without loops
 *   - without loop, the distance between to nodes are fixed, so for each node, it's left and right nodes are 
 *     critical node pair
 *   - if several circle intersected, the node in one loop can't be the critical pair of another loop.
 *     for example: 
 *     |----C1----|      
 *     A----C2----B
 *     |----C3----|
 *     then, c1,c2,c3 can't be pair as they can belong to different loop, but A and B can be pair as they all in same pair 
 * @author brightchen
 *
 */
public class CriticalNodes
{

}
